import { OccType } from "core/typeDefine/typeDefine"

export class ImmuneListModel {
    [OccType.Warrior]: number
    [OccType.MainTank]: number
    [OccType.Wizard]: number
    [OccType.Archer]: number
    [OccType.Assassin]: number
    [OccType.Assistant]: number
    constructor(opts: any = {}) {
        this[OccType.Warrior] = opts[OccType.Warrior] || 0
        this[OccType.MainTank] = opts[OccType.MainTank] || 0
        this[OccType.Wizard] = opts[OccType.Wizard] || 0
        this[OccType.Archer] = opts[OccType.Archer] || 0
        this[OccType.Assassin] = opts[OccType.Assassin] || 0
        this[OccType.Assistant] = opts[OccType.Assistant] || 0
    }
}

export class ResearchModel {
    lvl: number
    point: number//科研点
    equipmentLvls: number[]//科研设备等级
    newEquipmentLvls:any
    immuneList: number[] //训练等级
    immuneStarList: number[] //训练升星等级
    vaccines: any //疫苗
    immuneIndex: number
    researchEquipmentAttris: ResearchEquipmentAttrisModel
    constructor(opts: any = {}) {
        this.lvl = opts.lvl || 0
        this.point = opts.point || 0
        this.equipmentLvls = opts.equipmentLvls || [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
        this.newEquipmentLvls = opts.newEquipmentLvls || {}
        this.immuneList = opts.immuneList || [0, 0, 0, 0, 0, 0, 0, 0]
        this.immuneStarList = opts.immuneStarList || [0, 0, 0, 0, 0, 0, 0, 0]
        this.vaccines = opts.vaccines || {}
        this.researchEquipmentAttris = new ResearchEquipmentAttrisModel(opts.researchEquipmentAttris)
        this.immuneIndex =  opts.immuneIndex || 0
    }
}
export class ResearchEquipmentAttrisModel {
    gold: number
    exp: number
    lucky: number
    constructor(opts: any = {}) {
        this.gold = opts.gold || 0
        this.exp = opts.exp || 0
        this.lucky = opts.lucky || 0
    }
}